package com.android.sha.sprite;

import com.android.angle.AngleRotatingSprite;
import com.android.angle.AngleSpriteLayout;
import com.android.sha.bean.CardBean;
import com.android.sha.common.MyCommon;

public class CardSprite extends AngleRotatingSprite {

	public boolean outCard =false;
	public CardBean bean;
	public CardSprite(AngleSpriteLayout layout) {
		super(layout);
	}
	
	@Override
	public void step(float secondsElapsed) {
		super.step(secondsElapsed);
		if(outCard && this.mPosition.mY>MyCommon.HEIGHT/2){
		    this.mPosition.mY = this.mPosition.mY - 20;
		}else if(outCard){
		    this.mDie =true;
		    try{
		    	Thread.sleep(1000);
		    }
		    catch (Exception e) {
				e.printStackTrace();
			}
		    this.getParent().removeObject(this);
		    MyCommon.isCardOuting = false;
		}
	}
}
